<html>
<head><meta charset="utf-8"><title>Opinions wanted: good x.py defaults to suggest? · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html">Opinions wanted: good x.py defaults to suggest?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="210596421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/210596421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#210596421">(Sep 19 2020 at 04:10)</a>:</h4>
<p>I'm working on <a href="https://github.com/rust-lang/rust/issues/76619">https://github.com/rust-lang/rust/issues/76619</a>. What defaults would you like to see, both for new contributors, existing contributors, and users building rust from source? So far I have the following, but I'm not super tied to them.</p>
<div class="codehilite"><pre><span></span><code>$ cat config.toml.compiler
# These defaults are meant for contributors to the compiler who do not modify codegen or LLVM.
[rust]
# This enables `RUSTC_LOG=debug`, avoiding confusing situations
# where adding `debug!()` appears to do nothing.
# However, it makes running the compiler slightly slower.
debug-logging = true
# This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower.
incremental = true

$ cat config.toml.library
# These defaults are meant for contributors to the standard library and documentation.
[build]
# When building the standard library, you almost never want to build the compiler itself.
build-stage = 0
test-stage = 0
bench-stage = 0

[rust]
# This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower.
incremental = true

$ cat config.toml.llvm
# These defaults are meant for contributors to the compiler who modify codegen or LLVM.
[llvm]
# This enables debug-assertions in LLVM,
# catching logic errors in codegen much earlier in the process.
assertions = true

[rust]
# This enables `RUSTC_LOG=debug`, avoiding confusing situations
# where adding `debug!()` appears to do nothing.
# However, it makes running the compiler slightly slower.
debug-logging = true
# This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower.
incremental = true

$ cat config.toml.maintainer
# These defaults are meant for contributors building from source, without intending to make multiple changes.
[build]
# When compiling from source, you almost always want a full stage 2 build,
# which has all the latest optimizations from nightly.
build-stage = 2
test-stage = 2
doc-stage = 2
# When compiling from source, you usually want all tools.
extended = true
</code></pre></div>


<p>If there's another format that would make this easier to discuss (maybe individual github PRs?) I'm happy to do that as well.</p>



<a name="210597933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/210597933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> est31 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#210597933">(Sep 19 2020 at 05:01)</a>:</h4>
<p>You have set incremental = true in the first 3 scenarios. Why is it then not enabled by default?</p>



<a name="210598109"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/210598109" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#210598109">(Sep 19 2020 at 05:07)</a>:</h4>
<p><span class="user-mention" data-user-id="120096">@est31</span> <a href="https://github.com/rust-lang/rust/pull/76417">https://github.com/rust-lang/rust/pull/76417</a></p>



<a name="210598113"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/210598113" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#210598113">(Sep 19 2020 at 05:07)</a>:</h4>
<p>the main difference is these are opt-in, not opt-out</p>



<a name="210598164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/210598164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> est31 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#210598164">(Sep 19 2020 at 05:09)</a>:</h4>
<p>I see. Of course if you change the default you should set it to false in <code>config.toml.maintainer</code>, but then it'd still be technically opt out.</p>



<a name="210598210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/210598210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#210598210">(Sep 19 2020 at 05:10)</a>:</h4>
<p>the main point of this PR is that the defaults themselves are opt-in</p>



<a name="210598213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/210598213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> est31 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#210598213">(Sep 19 2020 at 05:10)</a>:</h4>
<p>Also is the config.toml.maintainer meant for <em>contributors</em> or for <em>distributors</em> ?</p>



<a name="210598219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/210598219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#210598219">(Sep 19 2020 at 05:10)</a>:</h4>
<p>you can ignore it ever happened and everything will still work the same</p>



<a name="210598275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/210598275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#210598275">(Sep 19 2020 at 05:12)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120096">est31</span> <a href="#narrow/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F/near/210598213">said</a>:</p>
<blockquote>
<p>Also is the config.toml.maintainer meant for <em>contributors</em> or for <em>distributors</em> ?</p>
</blockquote>
<p>'distro maintainers', maybe <code>users</code> would be a better name for it</p>



<a name="210599821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/210599821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> est31 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#210599821">(Sep 19 2020 at 06:10)</a>:</h4>
<p>Yeah users is best I think</p>



<a name="210695136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/210695136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#210695136">(Sep 21 2020 at 01:42)</a>:</h4>
<p>I would like to see hints for using quality-of-life things like ccache that are currently disabled by default because there's not a clear story for detecting them, even if it's not recommended per se.</p>



<a name="210695217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/210695217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#210695217">(Sep 21 2020 at 01:46)</a>:</h4>
<p>hmm, that seems like it should go in the dev guide I think</p>



<a name="210695255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/210695255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#210695255">(Sep 21 2020 at 01:46)</a>:</h4>
<p>it's useful, but solving a different problem</p>



<a name="210695268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/210695268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#210695268">(Sep 21 2020 at 01:46)</a>:</h4>
<p>Oh that's fair then, consider my suggestion to be one that such information be preserved somewhere.</p>



<a name="210695339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/210695339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#210695339">(Sep 21 2020 at 01:49)</a>:</h4>
<p>I definitely found "oh, I can tweak these things about my setup to speed this up? Useful."  to be <em>helpful</em> even if the sheer amount of information currently in the config.toml.example itself is frankly just <em>noise</em> at this point.</p>



<a name="211417705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/211417705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#211417705">(Sep 27 2020 at 13:54)</a>:</h4>
<blockquote>
<p>```</p>
<h1>When compiling from source, you almost always want a full stage 2 build,</h1>
<h1>which has all the latest optimizations from nightly.</h1>
<p>```</p>
</blockquote>
<p>I hardly ever need a stage 2 build and I do various things all across the codebase... what is the intended user of the "maintainer" template?</p>



<a name="211417770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/211417770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#211417770">(Sep 27 2020 at 13:56)</a>:</h4>
<p>sorry - I renamed it to 'user' on master. It's intended for people who aren't working on the compiler itself, like gentoo users or distro maintainers</p>



<a name="211417979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/211417979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#211417979">(Sep 27 2020 at 14:01)</a>:</h4>
<p>hm... but gentoo users should just use their distro package, right? the vast vast majority of users should never build rustc, they should use rustup or rustup-toolchain-install-master</p>



<a name="211417985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/211417985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#211417985">(Sep 27 2020 at 14:01)</a>:</h4>
<p>maybe "distro-maintainer" or just "distro" would be a better name</p>



<a name="211418178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/211418178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#211418178">(Sep 27 2020 at 14:06)</a>:</h4>
<p>gentoo users always build from source, it's the distinguishing feature of the distro</p>



<a name="211418185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/211418185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#211418185">(Sep 27 2020 at 14:06)</a>:</h4>
<p>but yeah distro might be a better name</p>



<a name="211418936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/211418936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#211418936">(Sep 27 2020 at 14:28)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F/near/211418178">said</a>:</p>
<blockquote>
<p>gentoo users always build from source, it's the distinguishing feature of the distro</p>
</blockquote>
<p>I know. but I would think usually they do not edit the package. so they will never even see that config file.</p>



<a name="211418952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/211418952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#211418952">(Sep 27 2020 at 14:29)</a>:</h4>
<p>basically, gentoo's equivalent of <code>apt install foo</code> is just slower than Debian's (okay and you can configure more flags and things), but the "API" between the user and the package manager is not all that different. so I dont see how being a gentoo user makes you any more likely to edit config.toml than an arch or debian user.</p>



<a name="211418997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Opinions%20wanted%3A%20good%20x.py%20defaults%20to%20suggest%3F/near/211418997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Opinions.20wanted.3A.20good.20x.2Epy.20defaults.20to.20suggest.3F.html#211418997">(Sep 27 2020 at 14:30)</a>:</h4>
<p>oh hmm you make a good point :/ At one point I suggested having <code>./configure</code> automatically <code>--set profile=distro</code> which might help with that</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>